﻿@model SearchRockstars

@{
    Layout = "SimpleLayout";
    ViewBag.Title = "Page with typed 'Rockstars' model and no C# controller";
    var rockstars = base.Gateway.Send(new SearchRockstars { Age = Model.Age }).Results;
    var title = Model.Age.HasValue ? $"{Model.Age} year old rockstars" : "All Rockstars";
}

<div id="content-page">
    
@Html.Partial("OtherPages", null)

<div>@title</div>   
<ul>
    @foreach (var rockstar in rockstars) {
        <li><a href="@rockstar.Url">@rockstar.LastName, @rockstar.FirstName</a> (<a href="?Age=@rockstar.Age">@rockstar.Age</a>)</li>
    }
</ul>

<p><a href="?">Show all Rockstars</a></p>

<h2>Razor View</h2>
<script src="https://gist.github.com/3162493.js"></script>

</div>
  